//
//  ViewController.m
//  Alarm3DExperiments5
//
//  Created by 우성 김 on 12. 4. 9..
//  Copyright (c) 2012년 yy01ar@gmail.com. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    AVAudioSession *session = [AVAudioSession sharedInstance];
    NSURL *url = [[NSBundle mainBundle] URLForResource:@"jrabbit" withExtension:@"mp3"];
    
    audioPlayer = [[AVAudioPlayer alloc]initWithContentsOfURL:url error:nil];
    [session setActive:YES error:nil];
    [session setCategory:AVAudioSessionCategoryPlayback error:nil];
    //audioPlayer.delegate = self;
    audioPlayer.volume = 0.0;
    audioPlayer.numberOfLoops = 1;
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

@end
